package com.ex.mzwqz.widget;

import android.app.Dialog;
import android.content.Context;
import android.graphics.drawable.AnimationDrawable;
import android.os.Bundle;
import android.widget.ImageView;

import com.ex.mzwqz.R;


public class ProgressDialog extends Dialog {

    private ImageView loadImage;

    public ProgressDialog(Context context) {
        super(context);
    }

    public ProgressDialog(Context context, int theme) {
        super(context, theme);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.view_dialog_progress);
        loadImage = (ImageView) findViewById(R.id.loadingImageView);
        setCancelable(true);
        setCanceledOnTouchOutside(true);
        ((AnimationDrawable) ((ImageView) loadImage
                .findViewById(R.id.loadingImageView)).getBackground()).start();
    }

}
